package com.woniuxy.secondhand.controller;


import com.woniuxy.life.core.api.CommonResult;
import com.woniuxy.secondhand.entity.SecGoodsorder;
import com.woniuxy.secondhand.service.SecGoodsorderService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 二手订单 前端控制器
 * </p>
 *
 * @author chaohuijiang
 * @since 2020-09-24
 */
@RestController
@RequestMapping("/secondhand/sec-goodsorder")
public class SecGoodsorderController {
    @Resource
    SecGoodsorderService secGoodsorderService;
    //订单的添加
    @RequestMapping("/insert")
    public CommonResult<SecGoodsorder> insert(@PathVariable("id") Integer secGoodsId, @RequestBody SecGoodsorder secGoodsorder){
        secGoodsorderService.insert(secGoodsId,secGoodsorder);
        return CommonResult.success();

    }
}
